import request from '@/utils/request'

// 分类列表
export const getClassify = function(params) {
  return request({
    url: '/api/vm-service/skuClass/search',
    method: 'GET',
    params
  })
}

// 删除商品类型
export const delClassify = function(data) {
  // console.log(id)
  return request({
    url: '/api/vm-service/skuClass/' + data.id,
    method: 'DELETE'
  })
}

// 新增商品类型
export const addClassify = function(data) {
  // console.log(id)
  return request({
    url: '/api/vm-service/skuClass',
    method: 'POST',
    data
  })
}

// 修改商品类型
export const editClassify = function(id, data) {
  return request({
    url: '/api/vm-service/skuClass/' + id,
    method: 'PUT',
    data
  })
}
